#ifndef KFILEWIDGET_H
#define KFILEWIDGET_H

#include <QWidget>
#include "../screencapsdk_global.h"

namespace kdk {

/** @defgroup
  */

class KFileWidgetPrivate;

/**
 * @brief The KFileWidget class
 * @since 2.4
 */
class SCREENCAPSDK_EXPORT KFileWidget : public QWidget
{
    Q_OBJECT
public:
    KFileWidget(QWidget *parent = nullptr);

public:
    /** @brief 设置主要文本
     *  @param str
     */
    void setMainText(QString str);

    /**
     * @brief 设置次级文本
     * @param str
     */
    void setSubText(QString str);

    /**
     * @brief 设置图片
     * @param icon
     */
    void setIcon(QIcon icon);

    /**
     * @brief 设置圆角
     * @param radius
     */
    void setBorderRadius(int radius);

    /**
     * @brief 设置圆角
     * @param bottomLeft
     * @param topLeft
     * @param topRight
     * @param bottomRight
     */
    void setBorderRadius(int bottomLeft,int topLeft,int topRight,int bottomRight);

Q_SIGNALS:
    void clicked();

protected:
    void paintEvent(QPaintEvent* event);
    bool eventFilter(QObject *watched, QEvent *event);

private:
    Q_DECLARE_PRIVATE(KFileWidget)
    KFileWidgetPrivate* const d_ptr;
};

}
#endif // KFILEWIDGET_H
